package com.esri.core.internal.a.b;

import com.esri.core.internal.io.handler.h;
import com.esri.core.internal.io.handler.n;
import com.esri.core.internal.tasks.d;
import com.esri.core.io.EsriServiceException;
import com.esri.core.map.CallbackListener;
import org.codehaus.jackson.JsonParser;

/* loaded from: classes.dex */
public class a extends d<c> {
    static String a = "http://utility.arcgis.com/sharing/kml";
    private static final long serialVersionUID = 1;
    private CallbackListener<Object> b;

    public a(b bVar, CallbackListener<Object> callbackListener) {
        super(bVar, a, null);
        this.b = callbackListener;
        if (!bVar.validate()) {
            throw new EsriServiceException("KML file's URL is missing");
        }
    }

    @Override // com.esri.core.internal.tasks.a
    /* renamed from: a */
    public c execute() throws Exception {
        JsonParser b = h.b(this.serviceURL, this.actionInput.generateRequestParams(), (n) null);
        c a2 = c.a(b, this.b);
        if (!b.isClosed()) {
            b.close();
        }
        return a2;
    }
}
